import logging
import redis




class Config(object):

    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@127.0.0.1:3306/information'
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    REDIS_HOST = '127.0.0.1'
    REDIS_PORT = 6379
    SECRET_KEY = 'OPTYwuJgknb0iONlztVEVx6iRTaDTcN4drJdcBBlTbVr9Is49IlRHebkFuSDajp/'
    SESSION_TYPE = 'redis'
    SESSION_USE_SIGNER = True
    SESSION_REDIS = redis.StrictRedis(host=REDIS_HOST, port=REDIS_PORT)
    PERMANENT_SESSION_LIFETIME = 24 * 3600 * 2


class DevelopementConfig(Config):
    DEBUG=True
    LOG_LEVEL = logging.DEBUG


class ProcreationConfig(Config):
    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@127.0.0.1:3306/information'
    LOG_LEVEL=logging.WARNING

config_dict={
    'development':DevelopementConfig,
    'procreation':ProcreationConfig
}
